include_rules = [
  # Allow inclusion of specific components that we depend on.
  # See comment in content/DEPS for which components are allowed.
  # *********************************** NOTE ***********************************
  # If adding a new component dependency, email
  # content-owners@chromium.org first.
  # ****************************************************************************
  "+components/discardable_memory/common",
  "+components/discardable_memory/public",
  "+components/discardable_memory/service",
  "+components/download/database",
  "+components/download/public/common",
  "+components/file_access",
  "+components/filename_generation",
  "+components/permissions/features.h",
  "+components/power_monitor",
  "+components/services/font",
  "+components/services/filesystem",
  "+components/services/quarantine/test_support.h",
  "+components/services/quarantine/quarantine.h",
  "+components/services/screen_ai/buildflags",
  "+components/services/screen_ai/public/cpp",
  "+components/services/storage",
  "+components/services/storage/public",
  "+components/session_manager/core",
  "+components/leveldb_proto/public",
  "+components/link_header_util",
  "+components/metrics",
  "+components/metrics:single_sample_metrics",
  "+components/network_session_configurator/common",
  "+components/offline_pages/buildflags/buildflags.h",
  "+components/offline_pages/core/request_header",
  "+components/payments/content/icon",
  "+components/payments/mojom",
  "+components/services/heap_profiling/public",
  "+components/services/quarantine/public/mojom/quarantine.mojom.h",
  "+components/system_media_controls",
  "+components/tracing",
  "+components/ukm",
  "+components/url_formatter",
  "+components/viz",
  "+components/web_package",
  "+components/cbor",
  "+components/os_crypt/sync/os_crypt_switches.h",
  # *********************************** NOTE ***********************************
  # If adding a new component dependency, email
  # content-owners@chromium.org first.
  # ****************************************************************************

  "+content/public/app",
  "+content/public/browser",
  "+device/base/synchronization",
  "+device/bluetooth",
  "+device/gamepad", # For gamepad API
  "+device/nfc",
  "+device/vr/public", # For WebXR API
  "+device/vr/buildflags/buildflags.h",  # For WebXR API
  # This can only be used on POSIX, in particular it mustn't be used on Windows
  # in the browser DLL.
  "+gin/v8_initializer.h",
  "+mojo",
  "+sql",
  "+ui/aura_extra",
  "+components/vector_icons",
  "+ui/linux",
  "+ui/strings/grit/ax_strings.h",
  "+ui/webui",

  # TODO(crbug.com/1079201): Consider removing "+serivces". Each service should
  # have explicit rules to allow services/*/public rather than adding a blanket
  # dependency.
  "+services",
  "-services/content",
  "+services/content/service.h",
  "+services/content/service_delegate.h",
  "-services/network",
  "+services/network/public/cpp",
  "+services/network/public/mojom",
  "-services/cert_verifier",
  "+services/cert_verifier/public/cpp",
  "+services/cert_verifier/public/mojom",

  # In general, //content shouldn't depend on //device.
  # This is the an exception.
  "+device/udev_linux",  # For udev utility and wrapper library.

  # Explicitly disallow using SyncMessageFilter to prevent browser from
  # sending synchronous IPC messages on non-UI threads.
  "-ipc/ipc_sync_message_filter.h",

  # Other libraries.
  "+third_party/iaccessible2",
  "+third_party/isimpledom",
  "+third_party/khronos",   # For enum definitions only
  "+third_party/libaom/av1_buildflags.h",
  "+third_party/re2",
  "+third_party/zlib",

  # Allow non-browser Chrome OS code to be used.
  "+chromeos",
  "+third_party/cros_system_api",

  # No inclusion of WebKit from the browser, other than the ones in
  # WebKit/public/{mojom,common}, or the ones that are strictly enum/POD,
  # header-only types, and some selected common code.
  "-third_party/blink",
  "+third_party/blink/public/common",
  "+third_party/blink/public/mojom",
  "+third_party/blink/public/platform/resource_request_blocked_reason.h",
  "+third_party/blink/public/platform/web_content_security_policy.h",
  "+third_party/blink/public/platform/web_fullscreen_video_status.h",
  "+third_party/blink/public/platform/web_text_input_type.h",
  "+third_party/blink/public/platform/mac/web_scrollbar_theme.h",
  "+third_party/blink/public/platform/modules/service_worker/web_service_worker_error.h",
  "+third_party/blink/public/platform/modules/sms/webotp_service.mojom.h",
  "+third_party/blink/public/public_buildflags.h",
  "+third_party/blink/public/strings/grit/blink_accessibility_strings.h",
  "+third_party/blink/public/strings/grit/blink_strings.h",
  "+third_party/blink/public/web/web_ax_enums.h",
  "+third_party/blink/public/web/web_console_message.h",
  "+third_party/blink/public/web/web_drag_status.h",
  "+third_party/blink/public/web/web_serialized_script_value_version.h",
  "+third_party/blink/public/mojom/frame/tree_scope_type.mojom.h",

  "+tools/v8_context_snapshot/buildflags.h",

  # DO NOT ADD ANY CHROME OR COMPONENTS INCLUDES HERE!!!
  # See https://sites.google.com/a/chromium.org/dev/developers/content-module
  # for more information.
]

specific_include_rules = {
  ".*test\.cc": [
    "+services/network/test",
  ],
  ".*test_utils\.(h|cc)": [
    "+services/network/test",
  ],
  "browser_main_loop\.cc": [
    # TODO(crbug.com/1049894): Remove.
    "+services/network/transitional_url_loader_factory_owner.h",
    "+device/fido/hid/fido_hid_discovery.h",
  ],
  "browser_main_loop\.h": [
    "+ui/ozone/buildflags.h",
  ],
  "browsing_data_(filter_builder|remover)_impl_unittest\.cc": [
    "+services/network/cookie_manager.h",
  ],
  "gpu_data_manager_visual_proxy_ozone_linux\.(cc|h)": [
    "+ui/ozone/public/ozone_platform.h",
    "+ui/ozone/public/platform_gl_egl_utility.h",
  ],
  "navigation_url_loader_impl_unittest\.cc": [
    "+services/network/resource_scheduler/resource_scheduler_client.h",
    "+services/network/url_loader.h",
    "+services/network/url_request_context_owner.h",
  ],
  "network_service_instance_impl\.cc": [
    # Used to instantiate a CertVerifierServiceFactory in the browser process.
    "+services/cert_verifier/cert_verifier_service_factory.h",
    # TODO(crbug.com/1049894): Remove.
    "+services/network/network_service.h",
  ],
  "signed_exchange_handler_unittest\.cc": [
    "+services/network/network_context.h",
  ],
  # SiteInstance and BrowsingInstance should not depend on the types of things
  # that rely on them, like RenderFrameHostImpl or WebContentsImpl.
  "(site_instance_impl|browsing_instance)\.(cc|h)": [
    "-content/browser/renderer_host",
    "-content/browser/web_contents",
    # These files do not cycle back to SiteInstance or BrowsingInstance.
    "+content/browser/renderer_host/render_process_host_impl.h",
    "+content/browser/renderer_host/agent_scheduling_group_host.h",
  ],
  "stable_video_decoder_factory\.cc" : [
    "+ui/ozone/public/ozone_switches.h",
  ],
  "storage_partition_impl_unittest\.cc": [
    "+services/network/cookie_manager.h",
    "+third_party/leveldatabase",
  ],
  "launch_as_mojo_client_browsertest.cc": [
    "+ui/ozone/public/ozone_switches.h",
  ],
  "site_per_process_mac_browsertest\.mm": [
    "+content/app_shim_remote_cocoa",
  ],
}
